#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main()
{
    int seconds, points, hour;
    scanf("%d", &seconds);
    hour = seconds / 3600;
    points = seconds % 3600 / 60;
    seconds = seconds % 3600 % 60;
    printf("%d %d %d", hour, points, seconds);
}